package org.system.core.common;

import java.util.Locale;

/**
 * @author baoRoot
 */
public class Constants {

    public static final String RESOURCE_PREFIX = "/profile";

    public static final String TOKEN = "token";

    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    public static final String SUPER_ADMIN = "admin";

    public static final String ALL_PERMISSION = "*:*:*";

    public static final String PERMISSION_DELIMETER = ",";

    public static final String ROLE_DELIMETER = ",";

    public static final String LOGIN_USER_KEY = "login_user_key";

    public static final String HTTP = "http://";

    public static final String HTTPS = "https://";

    public static final String WWW = "www.";

    public static final String TOKEN_PREFIX = "Bearer ";

    public static final String LOGIN_TOKEN_KEY = "login_tokens:";
    /** 部门正常状态 */
    public static final String DEPT_NORMAL = "0";

    /** 部门停用状态 */
    public static final String DEPT_DISABLE = "1";

    /** 字典正常状态 */
    public static final String DICT_NORMAL = "0";

    /** 是否为系统默认（是） */
    public static final String YES = "Y";

    /** 是否菜单外链（是） */
    public static final String YES_FRAME = "0";

    /** 是否菜单外链（否） */
    public static final String NO_FRAME = "1";

    /** 菜单类型（目录） */
    public static final String TYPE_DIR = "M";

    /** 菜单类型（菜单） */
    public static final String TYPE_MENU = "C";

    /** 菜单类型（按钮） */
    public static final String TYPE_BUTTON = "F";

    /** Layout组件标识 */
    public final static String LAYOUT = "Layout";

    /** ParentView组件标识 */
    public final static String PARENT_VIEW = "ParentView";

    /** InnerLink组件标识 */
    public final static String INNER_LINK = "InnerLink";
    /**
     * 密码校验规则
     */
    public static final int PASSWORD_MIN_LENGTH = 5;
    public static final int PASSWORD_MAX_LENGTH = 40;
    /**
     * 用户名校验规则
     */
    public static final int USERNAME_MIN_LENGTH = 2;
    public static final int USERNAME_MAX_LENGTH = 20;

    public static final Locale DEFAULT_LOCALE = Locale.SIMPLIFIED_CHINESE;

    public static final String UTF8 = "UTF-8";

    public static final String GBK = "GBK";

    public static final String LOGIN_SUCCESS = "Success";

    public static final String LOGOUT = "Logout";

    public static final String REGISTER = "Register";

    public static final String LOGIN_FAIL = "Error";

    public static final String SUCCESS = "0";

    public static final String FAIL = "1";

    public static final String SYS_DICT_KEY = "sys_dict:";

    public static final String PAGE_NUM = "pageNum";

    public static final String PAGE_SIZE = "pageSize";

    public static final Integer DEFAULT_PAGE_NUM = 1;

    public static final Integer DEFAULT_PAGE_SIZE = 10;

    public static final Integer USER_NIKE_MIN_LEN = 2;

    public static final Integer USER_NIKE_MAX_LEN = 30;

    public static final Integer ROLE_LINE_MIN_LEN = 2;

    public static final Integer ROLE_LINE_MAX_LEN = 100;

    public static final Integer ROLE_NAME_MIN_LEN = 2;

    public static final Integer ROLE_NAME_MAX_LEN = 30;

    public static final String[] JSON_WHITELIST_STR = { "org.springframework", "org.system.core" };

}
